/*
 * @Author: Wangtao
 * @Date: 2022-07-12 22:45:43
 * @LastEditors: Wangtao
 * @LastEditTime: 2022-09-19 19:52:50
 */

import { RouteRecordRaw } from 'vue-router'

/**
 * 客服工作台路由
 */

export const customerServiceRoutes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'customerServiceLayout',
    redirect: '/app/call_record',
    component: () =>
      import(/* webpackChunkName: "customerServiceLayout" */ '@app/base/views/layout/customer-servicelayout/index.vue'),
    children: [
      {
        path: 'app',
        name: 'call_card',
        redirect: '/app/call_record',
        meta: {
          layout: 'call'
        },
        component: () => import(/* webpackChunkName: "callCard" */ '@/app/call-center/views/recent-calls/index.vue'),
        children: [
          {
            path: 'card_info/:id',
            name: 'cardInfo',
            meta: {
              layout: 'call'
            },
            component: () =>
              import(/* webpackChunkName: "cardInfo" */ '@/app/call-center/views/recent-calls/component/cardInfo.vue')
          },
          {
            path: 'call_record',
            name: 'callRecord',
            meta: {
              layout: 'call'
            },
            component: () => import(/* webpackChunkName: "callRecord" */ '@app/call-center/views/call-record/index.vue')
          }
        ]
      },
      {
        path: 'app',
        name: 'callConfig',
        redirect: '/app/call_center',
        meta: {
          layout: 'config'
        },
        component: () => import(/* webpackChunkName: "callCard" */ '@app/call-center/views/app-center/index.vue'),
        children: [
          {
            path: 'call_center',
            name: 'callCenter',
            meta: {
              group: 'callConfig',
              title: '呼叫中心',
              layout: 'config'
            },
            component: () =>
              import(/* webpackChunkName: "callCard" */ '@app/call-center/views/app-center/call-center/index.vue')
          }
        ]
      },
      {
        path: 'personalInfo',
        name: 'personalInfo',
        component: () => import(/* webpackChunkName: "callCard" */ '@app/base/views/personal-info/index.vue')
      }
    ]
  }
]
